Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / androidApp / src / main / kotlin / org / meshtastic / app / map / MapLifecycleEffects.kt

Displaying Raw • Download

androidApp/src/main/kotlin/org/meshtastic/app/map/MapLifecycleEffects.kt 83a778a842822a709c80eacf137fb09d0aab5ae8 (83a778a8) Text, 1.55 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.map

Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.getValue
Tff7b72import T7ee787androidx.compose.runtime.rememberUpdatedState
Tff7b72import T7ee787androidx.lifecycle.compose.LifecycleStartEffect

T8b949e/**
* Runs [effect] only while the current lifecycle is at least STARTED and [enabled] is true.
*
* The cleanup returned by [effect] runs synchronously on ON_STOP, disable, or composition disposal. This is important
* for hardware work: a coroutine launched from an ON_STOP state change may not run after the host recomposer pauses.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffActiveWhileStartedTb4b4b4(Te6edf3enabledTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3effectTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3currentEffect Tff7b72by Te6edf3rememberUpdatedStateTb4b4b4(Te6edf3effectTb4b4b4)

Te6edf3LifecycleStartEffectTb4b4b4(Te6edf3enabledTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3cleanup Tff7b72= Tff7b72if Tb4b4b4(Te6edf3enabledTb4b4b4) Te6edf3currentEffectTb4b4b4(Tb4b4b4) Tff7b72else Tb4b4b4(Tb4b4b4{Tb4b4b4}Tb4b4b4)
Te6edf3onStopOrDispose Tb4b4b4{ Te6edf3cleanupTb4b4b4(Tb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.09s